//
//  LogHelper.m
//  iFeiertag
//
//  Created by shanshan on 10-4-9.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "LogHelper.h" 

@implementation LogHelper

+ (void)logWithPath:(char *)path line:(NSUInteger)line string:(NSString *)format, ... {
    NSString *pathString = [[NSString alloc] initWithBytes:path
                                                    length:strlen(path)
                                                  encoding:NSUTF8StringEncoding];
	
    va_list argList;
    va_start(argList, format);
    NSString *formattedString = [[NSString alloc] initWithFormat:format 
                                                       arguments:argList];
    va_end(argList);
	
    NSLog([NSString stringWithFormat:@"%@ (%d): %@", [pathString lastPathComponent], line, formattedString], nil);
    [formattedString release];
}

@end
